package cqyt.entrance;


import cqyt.manage.Manager;
import cqyt.utils.Utility01;


/**
 * @author 涵菜
 * @version 1.0
 */
public class MainClass {
    public static void main(String[] args) {

        Manager manager = new Manager();
        boolean flag = true;

        while (flag) {
            System.out.println("***********欢迎进入强国战机管控平台 ********");
            System.out.println("*****************************************");
            System.out.println("***********请输入编号选择对应功能 ********");
            System.out.println("请选择操作：");
            System.out.println("1. 录入军用飞机信息");
            System.out.println("2. 查看军用飞机信息");
            System.out.println("3. 修改军用飞机信息");
            System.out.println("4. 删除军用飞机");
            System.out.println("5. 选择军用飞机执行任务");
            System.out.println("0. 退出系统");

            int selection =Utility01.readMenuSelection();
            switch (selection) {
                case 1:
                    manager.addPlane();
                    break;
                case 2:
                    manager.viewPlanes();
                    break;
                case 3:
                    manager.updatePlane();
                    break;
                case 4:
                    manager.deleteAircraft();
                    break;
                case 5:
                    manager.selectPlaneToMission();
                    break;
                case 0:
                    System.out.println("退出系统...");
                    flag=false;
                    break;
                default:
                    System.out.println("输入的数字不符合规范，请重新输入！！");
                    break;
            }
        }
    }
}
